import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '../views/find.vue'
import Leaderboard from '../views/Leaderboard.vue'
import Shouye from '../views/shouye.vue'
import Video from '../views/video.vue'
import Recommend from '../views/shouye/recommend.vue'
import Soon from '../views/shouye/soon.vue'
import Demo1 from '../views/Leaderboard/demo1.vue'
import Demo2 from '../views/Leaderboard/demo2.vue'
import Demo3 from '../views/Leaderboard/demo3.vue'
import Demo4 from '../views/Leaderboard/demo4.vue'
import Demo5 from '../views/Leaderboard/demo5.vue'
import F1 from "../views/find/find1.vue"
import F2 from "../views/find/find2.vue"
import Video1 from "../views/video/video1.vue"
import Video2 from "../views/video/video2.vue"
import Video3 from "../views/video/video3.vue"
import Getfind from "../views/getfind.vue"



Vue.use(VueRouter)

const routes = [{
        path: '/getfind',
        name: 'Getfind',
        component: Getfind,
    },
    {
        path: '/find',
        name: 'Find',
        component: Find,
        children: [{
                path: '/find1',
                name: 'F1',
                component: F1,
            },
            {
                path: '/find2',
                name: 'F2',
                component: F2
            },
        ]
    },
    {
        path: '/Leaderboard',
        name: 'Leaderboard',
        component: Leaderboard,
        // redirect: 'demo1',
        children: [{
                path: '/demo1',
                name: 'Demo1',
                component: Demo1
            },
            {
                path: '/demo2',
                name: 'Demo2',
                component: Demo2
            },
            {
                path: '/demo3',
                name: 'Demo3',
                component: Demo3
            },
            {
                path: '/demo4',
                name: 'Demo4',
                component: Demo4
            },
            {
                path: '/demo5',
                name: 'Demo5',
                component: Demo5
            }
        ]

    },
    {
        path: '/shouye',
        name: 'Shouye',
        component: Shouye,
        redirect: 'Recommend',
        children: [{
                path: '/recommend',
                name: 'Recommend',
                component: Recommend,
            },
            {
                path: '/soon',
                name: 'Soon',
                component: Soon
            },
        ]

    },
    {
        path: '/video',
        name: 'Video',
        component: Video,
        children: [{
                path: '/video1',
                name: 'Video1',
                component: Video1,
            },
            {
                path: '/video2',
                name: 'Video2',
                component: Video2,
            },
            {
                path: '/video3',
                name: 'Video3',
                component: Video3,
            }
        ]
    },
    {
        path: "/",
        redirect: "/shouye"
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router